home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / qw12inst.zip / CHOOSDIR.TEC < prev    next >
Text File  |  1991-12-17  |  3KB  |  64 lines

  1.  
  2. ID:CD  Choosing a Directory When Starting a DESQview Window
  3. Quarterdeck Technical Note #217
  4. By:  Joe Wilder
  5.  
  6.       HOW A PROGRAM CAN CHOOSE A DIRECTORY ON STARTUP IN DESQVIEW
  7.  
  8.      A question mark may be used in the parameter field of Change a 
  9. Program to cause a program to pause and take input while starting. This 
  10. function can be incorporated into a system whereby a batch file is used 
  11. to start the program and a variable in the batch file lets you choose a 
  12. default directory while the batch file is running.  The DESQview manual
  13. has a reference to the use of a question mark in the parameter field.  
  14. It can be found by looking under "parameters" in the index at the back
  15. the book.  Here is an example of how Change a Program should look:
  16.  
  17.                               Change a Program
  18.  
  19. Program Name............: WordPerfect 5
  20.  
  21. Keys to Use on Open Menu: WP          Memory Size (in K): 400
  22. -----------------------------------------------------------------
  23. Program...: WORDPERF.BAT
  24.  
  25. Parameters: ?
  26.  
  27. Directory.: \
  28. -----------------------------------------------------------------
  29. Options:
  30.  
  31.      Writes text directly to screen.......: [N]                   
  32.      Displays graphics information........: [Y]                   
  33.      Virtualize text/graphics (Y,N,T).....: [N]                   
  34.      Uses serial ports (Y,N,1,2)..........: [N]                   
  35.      Requires floppy diskette.............: [N]
  36.  
  37.  
  38.      Here is an example of how the batch file should look:
  39.  
  40. (WORDPERF.BAT)
  41.  
  42. CD %1
  43. C:\WP50\WP
  44.  
  45.      We've purposely made the batch file with a different name than the 
  46. program startup file.  The reason for this is that, in most versions of 
  47. DOS, if there is a WP.BAT and a WP.EXE file in the same directory, the 
  48. WP.EXE file will be executed even if you specifically type in WP.BAT to 
  49. start it.  I put the WORDPERF.BAT file in the root directory.  However, 
  50. I could have put it in the \WP50 directory, because the filename is 
  51. different from that of the WordPerfect executable file.
  52.      When you start WordPerfect from the DESQview Open Window menu, the 
  53. batch file starts to run, but immediately pauses because of the question 
  54. mark in the parameter field in Change a Program.  The "%1" variable on 
  55. the "CD %1" line in the batch file is part of DOS's batch language; it 
  56. provides a way for the user to specify a parameter on the command line 
  57. and have it be passed to a particular place inside the batch file.  The 
  58. directory you type in at the pause will be placed in the batch file in 
  59. place of the "%1."  When you hit the Enter key, the batch file will 
  60. continue and start WordPerfect from the directory you have specified. 
  61.  
  62.            Copyright (C) 1991 by Quarterdeck Office Systems
  63.                 * * *   E N D   O F   F I L E    * * *
  64.